<?php
	$this->load->helper('url');
	$this->load->helper('form');
?>

<html>
<head>
    	<title>ICS SAIS</title>
        
<link href="<?=base_url();?>style/design.css" rel="stylesheet" type="text/css" />
</head>
    
<body>
   	<div id="cont">
        	<div id="header_slim">
            	<div id="header_main">
                	<div id="mhleft">
                    </div>
                    
                    <div id="mhcenter">
                    	<img src="<?=base_url();?>style/ics_logo_blue.png" id="logo"/>
                      <div id="label_sais">
                        	<div id="border_label">	</div>
                        <div id="label"><p>Students'Academic
Information System</p></div>
                      </div>
                  </div>
                    
                    <div id="mhright">
                    </div>
                </div>
   
                <div id="bottomhead">
                	<div id="bhleft_slim">
                    </div>
                    <div id="menu_bar_slim">
                    	<!--menu -->
						<?php
							$this->load->helper('url');
						?>
                        <div class="header_link">
                        	<?php echo anchor('home/student_checklist','<h>Checklist</h>'); ?>
                        </div>
                  		
                  		<ul id="nav">
                        	<li>
                                <div class="header_link">
                                    <a><h>Advisers</h></a>
                                </div>
                                <ul>
                                	<div id="drop_down">
										
                                        <li><?php echo anchor('home/student_advisers/sp', '<h>SP Advisers</h>'); ?></li>
                                        <li><?php echo anchor('home/student_advisers/reg','<h>Registration Advisers</h>'); ?></li>
                                    </div>
                                </ul>
                                
                           	</li>
                        
                        </ul>
                        
                        
                        <div class="header_link">
                        	<?php	echo anchor('home/student_messages', '<h>Messages</h>'); ?>
                        </div>
                        <div class="header_link">
                        	<?php echo anchor('home/student_univcases','<h>Cases</h>'); ?>
                        </div>
						<div class="header_link">
                        	<?php echo anchor('home/student_subjects','<h>Subjects</h>'); ?>
                        </div>
						<div class="header_link_right header_link">
                        	<?php echo anchor('home/student_info','<h>Basic Info</h>'); ?>
                        </div>
                    </div>
                </div>
            </div>
            
      <div id="body_user">
      	<div id="body_border_user">	<!--light blue border-->
        </div>
    <?php 
			
		foreach($student as $row){
			
		
	?>
        <div id="main_body">
				<?php
					$attr = array('name' => 'student_info','enctype' => 'multipart/form-data');
					echo form_open('home/student_edit_info',$attr);
				?>
				<table id="student_info">
					<tr>
						
						<?php
							//photo name
							$imgurl = $row->Photo;
							
						?>
						<td rowspan=4 colspan=2>
							<a href='' >
								<img src="<?php echo base_url().'user_images/'.$imgurl; ?>" onClick="javascript:openBox();" style="width:120px;height:120px;" id="user_img_edit" title="Upload new image!" />
							</a>
							
							
							
						</td>
						<td rowspan=1 colspan=4><h2 class="info_text" id="bsinfo">Edit Basic Information</h2></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=1><h2 class="info_text">Name: </h2></td>
						<td rowspan=1 colspan=1><h3 class="info_text">&nbsp;&nbsp;<?php echo $row->Last_Name.', '.$row->First_Name.' '.$row->Middle_Name; ?></h3></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><p class="info_text"><b>Student Number:</b>&nbsp;&nbsp;<?php echo $row->Student_No; ?></p></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><p class="info_text"><b>Course:</b>&nbsp;&nbsp;BSCS</p></td>
					</tr>
					<tr> 
						<td rowspan=1 colspan=2>&nbsp;</td>
						<td rowspan=1 colspan=1><label for="MOBILE_NO" class="info_text"><b>Mobile Number:</b>&nbsp;&nbsp;</label></td>
						<td rowspan=1 colspan=3><input type="text" title="09xxxxxxxxx" name="MOBILE_NO" id="MOBILE_NO" class="student_edit" pattern="[0-9]{11}" value="<?php echo "0".$row->Mobile_No; ?>"/></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2>&nbsp;</td>
						<td rowspan=1 colspan=2><p class="info_text"><b>Email:</b>&nbsp;&nbsp;<?php echo $row->Email_Address; ?></p></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=1>&nbsp;</td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><label class="info_text" for="HOME_ADDRESS" ><b>Home Address:</b></label></td>
						<td rowspan=1 colspan=4><input type="text" name="HOME_ADDRESS" id="HOME_ADDRESS" class="student_edit" pattern="[A-Za-z0-9, ]+" value="<?php echo $row->Home_Address; ?>"	/>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><label class="info_text" for="HOME_CONTACT"><b>Home Contact No.:</b></label></td>
						<td rowspan=1 colspan=4><input type="text" name="HOME_CONTACT" id="HOME_CONTACT" class="student_edit" pattern="[0-9-]{6,11}" value="<?php echo $row->Home_Contact; ?>"/></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><label class="info_text" for="COLLEGE_ADDRESS"><b>College Address:</b></label></td>
						<td rowspan=1 colspan=4><input type="text" name="COLLEGE_ADDRESS" id="COLLEGE_ADDRESS" class="student_edit" pattern="[A-Za-z0-9,. ]+" value="<?php echo $row->College_Address; ?>"	/>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><label class="info_text" for="COLLEGE_CONTACT"><b>College Contact No.:</b></label></td>
						<td rowspan=1 colspan=4><input type="text" name="COLLEGE_CONTACT" id="COLLEGE_CONTACT" class="student_edit" pattern="[0-9-]{6,11}" value="<?php echo $row->College_Contact; ?>"/></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><label class="info_text" for="CURRICULUM_TAKEN" ><b>Curriculum Taken:</b></label></td>
						<td rowspan=1 colspan=4><input type="text"  name="CURRICULUM_TAKEN" id="CURRICULUM_TAKEN" class="student_edit" pattern="[A-Za-z0-9-]+" value="<?php echo $row->Curriculum_Taken; ?>"/></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=2><label class="info_text" for="PHOTO" ><b>Change Picture:</b></label></td>
						<td rowspan=1 colspan=4><input type="file" name="PHOTO"  id="PHOTO"  /></td>
					</tr>
					<tr>
						<td rowspan=1 colspan=6>
							<?php echo '<p class="errors">'.validation_errors().'</p>'?>
						</td>
					</tr>
					<tr>
						<td rowspan=1 colspan=3>
							<center>
								<?php echo anchor('home/student_info','<div class="sub_button"><h>Cancel</h></div>'); ?>
							</center>
						</td>
						<td rowspan=1 colspan=3>
							<center><input type="submit" class="sub_button"/></center>
						</td>
					</tr>
				</table>	
			<?php
			echo form_close();
			?>
         </div>
      <?php
		}
	  ?>
      </div>
	  <div id="footer">
			<pre class="info_text">Created by parehiville. CMSC128 2nd Semester SY 2012-2013</pre>
	  </div>
	</div>
</body>